package org.example.camundaengine.listeners;

import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

/**
 * @Description:
 */

@Component
@Slf4j
public class NoticeCustomer implements ExecutionListener {
    @Override
    public void notify(DelegateExecution delegateExecution) throws Exception {
        log.info("开始通知客户");
        String homeAddress = (String) delegateExecution.getVariable("homeAddress");
        log.info("尊敬的客户您好，维修师傅正在前往，{}，请耐心等待", homeAddress);
    }
}
